#include "CESParser.h"

CESParser::CESParser(string sFileName)		
{		
	m_pFile = fopen (sFileName.c_str(), "rb");
	if (m_pFile == NULL)
	{
		perror ("Error opening file");
		exit(-1);
	}
}		

CESParser::~CESParser(void)		
{
	fclose(m_pFile);
}

bool CESParser::readData(){
	m_length = fread(m_cBuffer, 1, STREAM_LENGTH, m_pFile);

	return (m_length>0);
}

int CESParser::getSize(){
	return m_length;
}

const char * CESParser::getData()	
{
	return m_cBuffer;
}